<?php
include('config.php');

if(!empty($_FILES))
{
	$tmpname = $_FILES['guardar_fotos']['tmp_name'];
	$ruta = 'images/tmp/';
	$tmp = time().'.png';

	if(move_uploaded_file($tmpname, '../'.$ruta.$tmp))
	{
		echo '<script>parent.showImagePreview("'.$tmp.'");</script>';
	}
}
?>